"""
@author: huangll
@email: ll.huang@hzgosun.com
@time: 2019/7/23 15:56

运维配置的页面元素定位
"""

from poium import PageElement
from common.poium import Page


class OperationMaintenancePage(Page):
    """平台资源配置：服务器数量"""
    platform_server_number = PageElement(
        class_name="ivu-input-default",
        describe="服务器数量"
    )
    platform_server_number_invalid = PageElement(
        class_name="ivu-form-item-error-tip",
        describe="服务器数量校验"
    )
    # 平台资源配置：CPU数量
    platform_cpu_number = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[1]/div[2]/div[1]/div/div/input",
        describe="CPU数量"
    )
    # 平台资源配置：RAM内存容量
    platform_RAM_number =  PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[1]/div[1]/div[2]/div/div/input",
        describe="RAM内存容量"
    )
    # 平台资源配置：硬盘容量
    platform_disk_number = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[1]/div[2]/div[2]/div/div/input",
        describe="硬盘容量"
    )
    # 数据资源配置：服务器数量
    data_server_number = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[2]/div[1]/div[1]/div/div/input",
        describe="服务器数量"
    )
    # 数据资源配置：CPU数量
    data_cpu_number = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[2]/div[2]/div[1]/div/div/input",
        describe="CPU数量"
    )
    # 数据资源配置：RAM内存容量
    data_RAM_number = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[2]/div[1]/div[2]/div/div/input",
        describe="RAM内存容量"
    )
    # 数据资源配置：硬盘容量
    data_disk_number = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[1]/div[2]/div[2]/div[2]/div/div/input",
        describe="硬盘容量"
    )
    # 硬件监控配置：相机报送异常配置
    # 报送太少输入框
    less_report_input = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[1]/div[1]/div/div/input",
        describe="送报太少"
    )
    # 报送太少勾选
    less_report_selected = PageElement(
        class_name="ivu-checkbox-input",
        describe="勾选框"
    )
    # 报送太多输入框
    many_report_input = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[1]/div[2]/div/div/input",
        describe="报送太多"
    )
    # 报送太多勾选框
    many_report_selected = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[1]/div[2]/div/label[1]/span/input",
        describe="勾选框"
    )
    # 数据未报送勾选框
    no_report_selected = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[1]/div[3]/label/span/input",
        describe="勾选框"
    )
    # 设备展示配置
    # 相机：昨天真实数据勾选
    camera_yesterday = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[2]/div[1]/label[1]/span/input",
        describe="昨天真实数据"
    )
    # 相机：前天真实数据勾选
    camera_before_yesterday = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[2]/div[1]/label[2]/span/input",
        describe="前天真实数据"
    )
    # 手环：昨天真实数据勾选
    wristband_yesterday = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[2]/div[2]/label[1]/span/input",
        describe="昨天真实数据"
    )
    # 手环：前天真实数据勾选
    wristband_before_yesterday = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[2]/div[2]/label[2]/span/input",
        describe="前天真实数据"
    )
    # 电围：昨天真实数据勾选
    elefence_yesterday = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[2]/div[3]/label[1]/span/input",
        describe="昨天真实数据"
    )
    # 电围：前天真实数据勾选
    elefence_before_yesterday = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/section/div[2]/div[2]/div[3]/label[2]/span/input",
        describe="前天真实数据"
    )

    # 应用按钮
    a_btn = PageElement(
        class_name="ivu-btn-ghost",
        describe="应用"
    )
    # 应用成功的toast
    check_success = PageElement(
        class_name="ivu-message-notice-content",
        describe="应用成功"
    )